﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="wucNewsToolbar.ascx.cs"
    Inherits="Modules_Common_wucNewsToolbar" %>
<%@ Register Assembly="MetaBuilders.WebControls" Namespace="MetaBuilders.WebControls"
    TagPrefix="mb" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<script type="text/javascript">
    function ConfirmDelete()
    {
        var agree=confirm("Bạn có chắc muốn xóa bản ghi được lựa chọn ?");
        if (agree) return true;
        else return false; 
    }       

   function OnClientButtonClickingHandler(sender, eventArgs)
   {
        if(eventArgs.get_item().get_value()=="DeleteRecords")
        {
            eventArgs.set_cancel(true);
            var agree=confirm("Bạn có muốn xóa bản ghi được lựa chọn?");
            if (agree) eventArgs.set_cancel(false);
            else eventArgs.set_cancel(true); 
        }
   }
</script>

<table border="0" cellpadding="0" cellspacing="0" width="790" height="50px" class="ToolbarStyle"
    align="center">
    <tr>
        <td valign="middle" align="left" width="300px">
            <table border="0" cellpadding="0" cellspacing="0" height="50px">
                <tr>
                    <td width="10px">
                        &nbsp;
                    </td>
                    <td align="left" class="ToolbarText" valign="middle">
                        &nbsp;<asp:Label ID="lblFunctionTitle" runat="server">TÊN CHỨC NĂNG</asp:Label>
                        <asp:Label ID="lblNewsToolbarStatus" runat="server" Visible="false">NOMAL</asp:Label>
                        <asp:Label ID="lblNewsEditorialPeriod" runat="server" Visible="false">COMPOSE</asp:Label>
                    </td>
                    <td width="10px">
                        &nbsp;
                    </td>
                </tr>
            </table>
        </td>
        <td align="right" valign="middle">
            <table cellpadding="0px" cellspacing="0px" border="0px" width="100%">
                <tr>
                    <td align="right">
                        <telerik:RadToolBar ID="rtbNewsToolbar" runat="server" EnableEmbeddedSkins="false"
                            Skin="MCWFToolBarSkin" OnButtonClick="rtbNewsToolbar_ButtonClick" BorderWidth="0px"
                            OnClientButtonClicking="OnClientButtonClickingHandler" Style="float: right;">
                            <Items>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/new.png" Text="Tạo mới" ToolTip="Tạo mới"
                                    ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/del.png" Value="DeleteRecords"
                                    Text="Xóa" ToolTip="Xóa" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/edit.png" Text="Chỉnh sửa" ToolTip="Chỉnh sửa"
                                    ImagePosition="AboveText" CausesValidation="true">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/undo.png" Text="Quay lại" ToolTip="Quay lại"
                                    CausesValidation="false" ImagePosition="AboveText">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/save.png" Text="Lưu" ToolTip="Lưu"
                                    CausesValidation="true" ImagePosition="AboveText">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/newspreview2.png" Text="Xem" ToolTip="Xem bản tin"
                                    ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/submit_down.png" Text="Trả bài"
                                    ToolTip="Gửi trả cấp dưới" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/submit_up.png" Text="Gửi bài"
                                    ToolTip="Gửi cấp trên duyệt" ImagePosition="AboveText" CausesValidation="true">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/publishing.png" Text="Lên trang"
                                    ToolTip="Xuất bản tin" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/unpublishing.png" Text="Gỡ tin"
                                    ToolTip="Gỡ tin xuống" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/toolbarthumbs.png" Text="Ảnh tin"
                                    ToolTip="Ảnh đại diện" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/toolbartag.png" Text="Tag tin"
                                    ToolTip="Tag tin" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/toolbarnotes.png" Text="Phản hồi"
                                    ToolTip="Phản hồi" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/FlowEventButton.png" Text="Sự kiện"
                                    ToolTip="Sự kiện" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/NewsRelate.png" Text="Liên quan"
                                    ToolTip="Liên quan" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/NewsRelate.png" Text="IN"
                                    ToolTip="IN" ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/refresh.png" Text="Load lại" ToolTip="Load lại"
                                    ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                                <telerik:RadToolBarButton ImageUrl="~/Images/icons/filter.png" Text="Lọc" ToolTip="Lọc"
                                    ImagePosition="AboveText" CausesValidation="false">
                                </telerik:RadToolBarButton>
                            </Items>
                        </telerik:RadToolBar>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
